//
//  yhqViewCell.m
//  LazyCat
//
//  Created by rocky on 15/12/14.
//  Copyright (c) 2015年 zhanshu. All rights reserved.
//

#import "yhqViewCell.h"

@implementation yhqViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {//添加
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.firstImageV = [[UIImageView alloc]init];
        [self addSubview:self.firstImageV];
        self.secondImageV = [[UIImageView alloc]init];
        [self addSubview:self.secondImageV];
        self.arrImageV = [[UIImageView alloc]init];
        self.arrImageV.contentMode = UIViewContentModeScaleAspectFit;//图片按比例放进去
        [self addSubview:self.arrImageV];
        
        self.moneyLogoL = [[UILabel alloc]init];
        [self addSubview:self.moneyLogoL];
        self.moneyL = [[UILabel alloc]init];
        [self addSubview:self.moneyL];
        self.titleL = [[UILabel alloc]init];
        [self addSubview:self.titleL];
        self.timeL = [[UILabel alloc]init];
        [self addSubview:self.timeL];
        self.lqCountL = [[UILabel alloc]init];
        [self addSubview:self.lqCountL];
        self.hasUseL = [[UILabel alloc]init];
        [self addSubview:self.hasUseL];
    }
    return self;
}
-(void)layoutSubviews {//重新布局
    self.backgroundColor = BackColor;
    self.firstImageV.frame = CGRectMake(10, 10, 80, 80);
    self.secondImageV.frame = CGRectMake(90, 10, ScreenWidth-100, 80);
    self.secondImageV.image = [UIImage imageNamed:@"baisebeijing"];
    self.arrImageV.frame = CGRectMake(ScreenWidth-25, 45, 10, 10);
    self.arrImageV.image = [UIImage imageNamed:@"huijiantou"];
    
    self.moneyLogoL.frame = CGRectMake(18, 33, 12, 15);
    self.moneyLogoL.text = @"¥";
    self.moneyLogoL.font = [UIFont systemFontOfSize:16];
    self.moneyLogoL.textAlignment = NSTextAlignmentCenter;
    self.moneyLogoL.textColor = [UIColor whiteColor];
    
    self.moneyL.frame = CGRectMake(30, 35, 50, 30);
    self.moneyL.textColor = [UIColor whiteColor];
    self.moneyL.textAlignment = NSTextAlignmentCenter;
    self.moneyL.font = [UIFont boldSystemFontOfSize:30];
    
    self.titleL.frame = CGRectMake(110, 25, ScreenWidth-140, 12);
    self.titleL.textAlignment = NSTextAlignmentLeft;
    self.titleL.font = [UIFont systemFontOfSize:14];
    
    self.timeL.frame = CGRectMake(110, 47, ScreenWidth-140, 10);
    self.timeL.textAlignment = NSTextAlignmentLeft;
    self.timeL.font = [UIFont systemFontOfSize:12];
    self.timeL.textColor = [UIColor colorWithRed:153/255.0 green:153/255.0 blue:153/255.0 alpha:1.0];
    
    self.lqCountL.frame = CGRectMake(110, 62, 80, 20);
    self.lqCountL.textAlignment = NSTextAlignmentLeft;
    self.lqCountL.font = [UIFont systemFontOfSize:12];
    self.lqCountL.textColor = [UIColor colorWithRed:153/255.0 green:153/255.0 blue:153/255.0 alpha:1.0];
    
    self.hasUseL.frame = CGRectMake(200, 62, 80, 20);
    self.hasUseL.textAlignment = NSTextAlignmentLeft;
    self.hasUseL.font = [UIFont systemFontOfSize:12];
    self.hasUseL.textColor = [UIColor colorWithRed:153/255.0 green:153/255.0 blue:153/255.0 alpha:1.0];
}



- (void)awakeFromNib {
    
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

}

@end
